package com.wetask.admin.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class LoginAdminController {
	private static final Logger logger = LoggerFactory.getLogger(LoginAdminController.class);
	
	@RequestMapping(value="/", method=RequestMethod.GET)
	public String openHome(Model model){
		logger.info("openLogin()");
		
		return "redirect:/home";
	}
	
	@RequestMapping(value="/login", method=RequestMethod.GET)
	public String openLogin(Model model){
		logger.info("openLogin()");
		
		return "admin/login";
	}
	@RequestMapping(value="/loginFailed", method=RequestMethod.GET)
	public String loginFail(Model model){
		logger.info("openLogin()");
		
		return "admin/login";
	}
	
	@RequestMapping(value="/page-not-found", method=RequestMethod.GET)
	public String pageNotFound(Model model){
		return "errorPages/PageNotFound";
	}
	
}
